const express = require("express");
const app = express();

app.use(express.static("./www"));

app.get("/getUser", (req, res)=>{
    const obj = {
        msg1:"这是getUser接口，接收到前端数据，放在data属性内",
        data: req.query,
        msg2:"再响应给前端"
    }
    res.send( JSON.stringify(obj) );
})

app.listen(3000, ()=>{
    console.log("服务器开启成功,地址为: http://localhost:3000")
})
